class Person < ActiveRecord::Base
  has_many :topics
  has_many :posts

  def self.authenticate(username, password)
    person = self.find_by_username username
    if person
      person = nil if person.password != password
    end
    person
  end
end
